import type { BannerItem, FourCoreItem } from "../types/banner";
import http from "../utils/http";

// Banner 列表
export const postBannerList = (type_id: number) => {
  return http<BannerItem[]>({
    url: "Banner/all",
    method: "POST",
    data: {
      type_id,
    },
  });
};

// 单页查询
export const postOnePageQuery = (id: number) => {
  return http<string>({
    url: "OnePage/json",
    method: "POST",
    data: {
      id,
    },
  });
};

// 单页查询
export const postOnePageQueryAll = () => {
  return http<any[]>({
    url: "OnePage/all",
    method: "POST",
  });
};


// 四大核心业务
export const postFourCore = () => {
  return http<FourCoreItem[]>({
    url: "FourCore/all",
    method: "POST",
  });
};

// 业务详情
export const postFourCoreDetail = (id:number) => {
  return http<string>({
    url: "FourCore/json",
    method: "POST",
    data: {
      id,
    },
  });
};

// 热门课程
export const postHotCourse = () => {
  return http<any>({
    url: "HotCourse/all",
    method: "POST",
  });
};

// 品牌合作
export const postBrandList = () => {
  return http<any>({
    url: "Brand/all",
    method: "POST",
  });
};

// 学院去向
export const postStudentList = () => {
  return http<any>({
    url: "Student/all",
    method: "POST",
  });
};

// 获取配置项
export const postSettingData = () => {
  return http<any>({
    url: "Index/config",
    method: "POST",
  });
};